-- attrib_elect
-- create by panyl
-- 属性提升N(静电场)

return {
    apply = function(prop, baseValue)
        -- 提升的值
        local v = prop[3];
        return v;
    end,

    desc = function(prop)
        local row = PropM.getRow(prop[1]);
        local desc = row.desc;

        local key = FormulaM.invoke("CALC_SKILL_APPEND_PROP", 32);
        if key then
            local p = PropM.combine(ME.user, key, 32);
            if PropM.apply(p, 1) > 0 then
                desc = row.append_desc;
            end
        end

        local attrib = FieldsM.getFieldName(prop[2]);
        if attrib then
            desc = string.gsub(desc, "{0}", attrib);
        end

        desc = string.gsub(desc, "{1}", prop[3]);

        return desc;
    end,

    record = function(target, prop, path)
        return false;
    end
};
